export default {
  state: {
    UserInfo: JSON.parse(sessionStorage.getItem('userInfo')) || {},
    token: sessionStorage.getItem('token') || '',
    isCollapse: false, //伸缩栏
  },
  mutations: {
    /* 设置token  */
    setToken(state, token) {
      state.token = token
    },

    /* 设置伸缩栏 */
    setIsCollapse(state) {
      state.isCollapse = !state.isCollapse
    },
    /* 设置用户信息 */
    setUserInfo(state, UserInfo) {
      state.UserInfo = UserInfo
    },
  },
}
